package d01012;

public class Student {
    private int stuNo;
    private String stuName;
    private int age;
    public static String className=null;//静态属性 归属类 标准访问：类名.静态属性名

    public static void print(){
        System.out.println("班级名称:"+className);
        run();
    }

    {
        System.out.println("实例块.....");
    }
    static{
        System.out.println("静态块......");
    }
    public static void run(){

    }

    public int getStuNo() {
        return stuNo;
    }

    public void setStuNo(int stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Student(int stuNo, String stuName, int age) {
        this.stuNo = stuNo;
        this.stuName = stuName;
        this.age = age;
    }
    public Student(){
        System.out.println("无参数构造函数.....");
    }

    public void showInfo(){
        System.out.println("学号："+stuNo+",姓名"+stuName+",年龄："+age+",班级名称"+className);
        run();
    }

}
